﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using CANO.Data.DAOs;

namespace CANO.WebSite.Inbox
{
	public partial class Mensaje : System.Web.UI.Page
	{
		protected void Page_Load(object sender, EventArgs e)
		{
			Session["currentModule"] = "Inbox";

			if (Request.QueryString["ID"] != null)
			{
				int NotificacionID = Convert.ToInt32(Request.QueryString["ID"]);
				NotificationDAO notificacionToDisplay = new NotificationDAO().GetNotificationByID(NotificacionID);

				txtFecha.Value = notificacionToDisplay.FechaHora.ToShortDateString();
				txtRemitente.Value = notificacionToDisplay.RemitenteDisplay;
				txtMensaje.Value = notificacionToDisplay.Mensaje;

			}
			else { Response.Redirect("/Inbox/Inbox.aspx"); }
		}
	}
}